// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.MachineLearning;

public sealed partial class TrainedModelAssignmentRoutingTable
{
	/// <summary>
	/// <para>
	/// Current number of allocations.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("current_allocations")]
	public int CurrentAllocations { get; init; }

	/// <summary>
	/// <para>
	/// The reason for the current state. It is usually populated only when the
	/// <c>routing_state</c> is <c>failed</c>.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("reason")]
	public string Reason { get; init; }

	/// <summary>
	/// <para>
	/// The current routing state.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("routing_state")]
	public Elastic.Clients.Elasticsearch.MachineLearning.RoutingState RoutingState { get; init; }

	/// <summary>
	/// <para>
	/// Target number of allocations.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("target_allocations")]
	public int TargetAllocations { get; init; }
}